package com.bnzjy.srb.core.pojo.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.CreditCardNumber;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(description = "账户绑定")
public class UserBindVO {
    
    @NotNull
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|20|(3\\d))\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", message = "身份证号错误")
//    @Pattern(regexp="^(\\d{18,18}|\\d{15,15}|(\\d{17,17}[x|X]))$", message="身份证格式错误")
    @ApiModelProperty(value = "身份证号")
    private String idCard;

    @NotEmpty(message = "用户名不能为空")
    @ApiModelProperty(value = "用户姓名")
    private String name;
   
    @ApiModelProperty(value = "银行类型")
    private String bankType;
    
    @CreditCardNumber(message = "银行卡号不正确")
    @ApiModelProperty(value = "银行卡号")
    private String bankNo;
    
    @NotNull
    @Length(max = 11)
    @Pattern(regexp = "^((13[0-9])|(15[^4,\\D])|(17[0-9])|(18[0-9]))\\d{8}$", message = "手机格式错误")
    @ApiModelProperty(value = "手机号")
    private String mobile;
    
}
